Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for generic version label parameter in plugins xml #495

Merged
merged 2 commits into from
Dec 28, 2024

Conversation

Xpirix
Copy link
Collaborator

@Xpirix Xpirix commented Dec 18, 2024

Fix for #448

  • Added support for generic label parameters (latest, ltr and stable) in the plugin xml.
  • When using one of these parameters, the view will get the numbered version from https://version.qgis.org/version.txt or version-ltr.txt (depending on the parameter).
  • Redirect to the same view but using the numbered version as we already have them cached
  • Note: The full version with patch is not supported so we only use the major and minor version here.
generic-label-support.mov

@Xpirix Xpirix requested a review from dimasciput December 18, 2024 06:39
@Xpirix Xpirix merged commit e224d78 into qgis:master Dec 28, 2024
2 checks passed
Comment on lines +75 to +78
url = 'https://version.qgis.org/version-ltr.txt'
elif param.lower() == 'latest':
url = 'https://version.qgis.org/version.txt'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A cleaner way and then instead of using re.search(r'QGIS Version \d+\|Visit .+ version (\d+\.\d+)', content), would be to switch to the JSON equivalent file :

https://version.qgis.org/version.json

It's way less prone to error of re.match, would you like to the do the change @Xpirix ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point @Gustry , I was not aware of this file before. Thank you.

The version.json just requires a small fix (qgis/QGIS-Website#513) so we can directly use the version attribute as it currently shows <no_value>.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've submitted the changes at #500

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it's indeed more robust ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants